Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPCs taking canned food donations no longer remove the food from the can #72759

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

katemonster33
Copy link
Contributor

Summary

Bugfixes "fixes issue where NPCs could take an item like canned corn as a donation and would remove the corn from the can and give you the can back."

Purpose of change

Fixes: #68456

Describe the solution

Modify f_bulk_trade_accept to look for sealed items with a single pocket that contains only the target item. If it is found, remove the item from inventory and give it to the NPC.

Describe alternatives you've considered

Testing

Spawn the New England Church Retreat, find Eddie, spawn 10x canned corn in inventory (contained), talk to Eddie and give him the 10 cans. Verify the cans and corn both end up in Eddie's inventory.

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Apr 1, 2024
src/npctalk.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 1, 2024
…ning the target item with the item asked for
@katemonster33 katemonster33 force-pushed the traders_respect_cans branch from 508deff to 9f6ba0c Compare April 2, 2024 17:37
@I-am-Erk I-am-Erk merged commit bb46136 into CleverRaven:master Apr 4, 2024
21 of 25 checks passed
@I-am-Erk I-am-Erk added the 0.H Backport PR to backport to the 0.H stable release canddiate label Apr 4, 2024
Procyonae pushed a commit to Procyonae/Cataclysm-DDA that referenced this pull request May 16, 2024
…ct_cans

NPCs taking canned food donations no longer remove the food from the can
Maleclypse added a commit that referenced this pull request May 17, 2024
@Procyonae Procyonae added 0.H Backported and removed 0.H Backport PR to backport to the 0.H stable release canddiate labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.H Backported astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

u_bulk_trade_accept doesn't respect item containers.
4 participants